import http from "http"
let ports = () => {    
    return new Promise((resolve, rej) => {
        let server = http.createServer();
        server.listen(0);
        server.on('listening', () => {
            let port = server.address().port
            server.close()
            resolve(port)
        })
    })
}
export let port = ports